package edu.yctc.delivery.controller.rest;

import java.util.List;

import edu.yctc.delivery.entity.DeliveryPointDO;
import edu.yctc.delivery.entity.ResultDO;
import edu.yctc.delivery.entity.TruckDO;
import edu.yctc.delivery.vo.DeliveryVO;

/**
 * 元数据rest接口
 * 
 *
 * @author 渠立庆
 */
public interface MetadataRestController {

    /**
     * 通过配送员（用户）的id返回DeliveryVO集
     * 
     * @param userId
     * @return
     */
    public ResultDO<List<DeliveryVO>> getDeliveryVOsByUserId(long userId);

    /**
     * 通过配送员的id删除订单信息
     * 
     * @param userId
     * @return
     */
    public ResultDO<Void> deleteDeliveryDOsByUserId(long userId);

    /**
     * 通过配送员的id和配送地点的id来删除订单信息
     * 
     * @param userId
     * @param deliveryPointId
     * @return
     */
    public ResultDO<Void> deleteDeliveryDOByUserIdAndDeliveryPointId(long userId, long deliveryPointId);

    /**
     * 插入配送订单信息
     * 
     * @param deliveryVOs
     * @return
     */
    public ResultDO<Void> insertDeliveryDOs(List<DeliveryVO> deliveryVOs);

    /**
     * 展示所有的线路
     * 
     * @param id
     * @return
     */
    public ResultDO<List<DeliveryVO>> showAllDelivery();

    /**
     * 查看单个配送员配送情况
     * 
     * @param id
     * @return
     */
    public ResultDO<List<DeliveryVO>> getDeliveryVOsByName(String name);

    /**
     * 添加配送点
     * 
     * @param deliveryPointDO
     * @return
     */
    public ResultDO<Void> insertDeliveryPointDO(DeliveryPointDO deliveryPointDO);

    /**
     * 通过配送点的id删除配送点信息
     * 
     * @param deliveryPointId
     * @return
     */
    public ResultDO<Void> deleteDeliveryPointDO(long deliveryPointId);

    /**
     * 修改配送点信息
     * 
     * @param deliveryPointDO
     * @return
     */
    public ResultDO<Void> updateDeliveryPointDO(DeliveryPointDO deliveryPointDO);

    /**
     * 根据配送点的id查询配送点的信息
     * 
     * @param deliveryPointId
     * @return
     */
    public ResultDO<DeliveryPointDO> getDeliveryPointDOById(long deliveryPointId);

    /**
     * 录入货车信息
     * 
     * @param truckDO
     * @return
     */
    public ResultDO<Void> insertTruckDO(TruckDO truckDO);

    /**
     * 通过货车的id删除货车信息
     * 
     * @param truckId
     * @return
     */
    public ResultDO<Void> deleteTruckDO(long truckId);

    /**
     * 修改货车的信息
     * 
     * @param truckDO
     * @return
     */
    public ResultDO<Void> updateTruckDO(TruckDO truckDO);

    /**
     * 根据货车的Id返回truckDO
     * 
     * @param truckId
     * @return
     */
    public ResultDO<TruckDO> getTruckDOById(long truckId);
}
